/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class CeilingLight {
    static categoryCode = '010010034';

    static categoryName = '吸顶灯';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return CeilingLight.categoryCode;
    }

    get categoryName() {
        return CeilingLight.categoryName;
    }

    getBrightness(params) {
        return command({
            method: 'getBrightness',
            methodId: 'phEqZsfP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getColor(params) {
        return command({
            method: 'getColor',
            methodId: 'p1vFkqMl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getColorTemperature(params) {
        return command({
            method: 'getColorTemperature',
            methodId: 'pDrhxkW5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMode(params) {
        return command({
            method: 'getMode',
            methodId: 'pghzVDbm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'ptRSAupw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setBrightness(params) {
        return command({
            method: 'setBrightness',
            methodId: 'pZgRgxZM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setColor(params) {
        return command({
            method: 'setColor',
            methodId: 'peHyXVQE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setColorTemperature(params) {
        return command({
            method: 'setColorTemperature',
            methodId: 'ppAXp3u9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMode(params) {
        return command({
            method: 'setMode',
            methodId: 'pUPQQG2n',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'pGoxubwK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default CeilingLight;
